{extend name='public/layout' /}
{block name='content'}
<div class="main overflow_h">
    <div class="position"><p><span>更新时间：{:date("Y年m月d日")}</span>您当前的位置：您当前的位置：<a href="{:url('Index/index')}" title="{$site.title}">{$site.title}</a> &gt; <a
            href="{:url('Loupan/index')}">新房</a>  &gt;{$info.title}</p></div>
    <div class="m_t_15 overflow_h">
        <div class="n_h_simg detail_slide">
            <div class="n_h_simg01 large_box">
                <ul>
                    <li>
                        <img src="{$info.img}" width="562" height="420">
                    </li>
                    {notempty name='slidePic'}
                    {volist name='slidePic' id='vo'}
                    <li {if condition="$i gt 1"}style="display: none;"{/if}>
                    <img src="{$vo.img}" width="562" height="420">
                    </li>
                    {/volist}
                    {/notempty}
                </ul>
            </div>
            <div class="n_h_simg02">
                <span class="n_arr01 left_btn"></span>
                <div class="small_list">
                <ul>
                    <li class="on">
                            <div class="n_h_simg02_t"><a href="javascript:;">封面图</a></div>
                            <img src="{$info.img}" width="88" height="66">
                    </li>
                    {volist name='slidePic' id='vo'}
                    <li>
                    <div class="n_h_simg02_t"><a target="_blank" href="{:url('Loupan/pic',['house_id'=>$info['id'],'cate'=>$key])}">{$vo.cate_name}</a></div>
                    <img src="{$vo.img}" width="88" height="66">
                    </li>
                    {/volist}

                </ul>
                </div>
                <span class="n_arr02 right_btn"></span></div>
        </div>
        <div class="n_h_text">
            <div class="n_h_t1 overflow_h">
                <b>{$info.title}</b>
                <span class="n_h_t_z">{$info.house_status_name}</span>
                <a href="javascript:;"  data-uri="{:url('Ajax/italy',['type'=>1])}" data-bid="{$info.id}" class="but07 J_col">关注该楼盘</a>
            </div>
            <div class="h_ts">
                {volist name='info.tags_name' id='vo'}
                <i class="h_ts0{$i}">{$vo}</i>
                {/volist}
            </div>
            <div class="n_h_t2">
                <span><b class="text03">{$info.average_price}</b>元/平米</span>
                <i class="n_ico01"><a href="javascript:;" data-uri="{:url('Ajax/baoming',['id'=>$info['id'],'type'=>2])}" class="J_dialog">变价通知</a></i>
                <i class="n_ico04"><a href="{:url('Dai/index')}">房贷计算器</a></i>
            </div>
            {if condition="!empty($info.youhui) or $info['is_group'] eq 1"}
            <dl class="dj_yh overflow_h">
                <dt>独家优惠：</dt>
                {notempty name='info.youhui'}
                <dd>
                    <span class="fan">惠</span><span class="org">{$info.youhui}</span><span class="text02"><a href="javascript:;" class="J_dialog" data-uri="{:url('Ajax/baoming',['id'=>$info['id'],'type'=>1])}">立即领取</a></span>
                </dd>
                {/notempty}
                {if condition="$info['is_group'] eq 1"}
                <dd>
                    <span class="hui">团</span><span class="org">{notempty name='info.group_youhui'}{$info.group_youhui}{else /}该楼盘正在参加团购{/notempty}</span><span class="text02"><a href="javascript:;" class="J_dialog" data-uri="{:url('Ajax/baoming',['id'=>$info['id'],'type'=>4])}">立即报名</a></span>
                </dd>
                {/if}
            </dl>
            {/if}
            <div class="n_h_t3">
                <p>开盘时间：{$info.open_time} | 交房时间：{$info.complate_time}</p>
                <p>楼盘地址：{$info.address}</p>
                <p>主力户型：
                    {fang:lists table='house_type' field='title,room,jianzhu_area,id' where='house_id=$id and status=1 and is_rec = 1' limit='4' id='data'}
                    <a target="_blank" title="{$data.title}" href="{:url('Loupan/typeShow',['house_id'=>$info['id'],'id'=>$data['id']])}">{$data.room}室({$data.jianzhu_area}㎡)</a>&nbsp;
                    {/fang:lists}
                     <span class="text02"><a href="{:url('Loupan/type',['house_id'=>$info['id']])}">全部户型</a></span>
                </p>
                <p class="overflow_h">
                    <span class="text04">客户经理：<i class="org">{$info.sale_phone.phone}{notempty name='info.sale_phone.fenhao'}转{$info.sale_phone.fenhao}{/notempty}</i></span>
                    <a href="javascript:;" data-uri="{:url('Ajax/baoming',['id'=>$info['id'],'type'=>3])}" class="but08 J_dialog" style="margin-top:5px;">免费通话</a>
                </p>
                <p><a href="javascript:;" data-uri="{:url('Ajax/baoming',['id'=>$info['id'],'type'=>1])}" class="but09 J_dialog">一键抢独家优惠</a></p>
            </div>
        </div>
    </div>
    {notempty name='info.youdian'}
    <div class="n_liyou">
        <b>楼盘推荐理由：</b>
        <p>{$info.youdian}</p>
    </div>
    {/notempty}
    <div class="m_t_15 overflow_h">
        <div class="n_h_n3_l">
            <div class="n_h_n3_t">
                {include file='loupan/nav' /}
            </div>

            <div class="news_h_box">
                <div class="news_h_box01">
                    <div class="title03"><span class="more"> <a href="{:url('Loupan/news',['house_id'=>$info['id']])}">更多 ></a></span>楼盘动态</div>

                    {fang:lists table='article' field='id,title,create_time,cate_id,img,description' where="house_id=$id and status=1" order='ordid asc,id desc' limit='2' id='data'}
                    <dl class="overflow_h">{php}$url=url('News/detail',['id'=>$data['id']]);{/php}
                        <dt><a href="{$url}" title="{$data.title}"><img alt="{$data.title}" src="__IMG__/loading.gif" class="lazy" data-original="{$data.img}" width="130" height="80"></a></dt>
                        <dd><b><a href="{$url}" title="{$data.title}">{$data.title}</a></b></dd>
                        <dd><a href="{$url}" title="{$data.title}">{:msubstr($data['description'],0,108)}</a></dd>
                        <dd>{$data.create_time|date='Y-m-d',###}</dd>
                    </dl>
                    {/fang:lists}

                </div>
                <div class="news_h_box02">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/type',['house_id'=>$info['id']])}">更多 ></a></span>全部户型</div>
                    <div class="tishi"><p>温馨提示：总价与实际情况可能有偏差，仅供参考，具体价格请以售楼处公示为准！</p></div>
                    <ul>
                        {fang:lists table='house_type' field='id,title,room,ting,wei,chu,yang,price,jianzhu_area,img' where="status=1 and house_id=$id" order="ordid asc,id desc" limit='4' id='data'}
                        <li class="overflow_h">
                            <a href="{:url('Loupan/typeShow',['house_id'=>$info['id'],'id'=>$data['id']])}">
                                <span class="n_h_img"><img alt="{$data.title}" src="__IMG__/loading.gif" class="lazy" data-original="{$data.img}" width="182" height="138"></span>
                                <div class="n_h_box01">
                                    <p><b>{$data.title}{$data.room}室{$data.ting}厅{$data.wei}卫{$data.yang} {$data.jianzhu_area}㎡</b></p>
                                    {notempty name='data.special'}<p class="org2">户型特色：{$data.special}</p>{/notempty}
                                </div>
                                <div class="n_h_box02">
                                    <b>{$data.price}万</b>
                                </div>
                            </a>
                        </li>
                        {/fang:lists}
                    </ul>
                    <div class="n_more"><a href="{:url('Loupan/type',['house_id'=>$info['id']])}">查看更多户型</a></div>
                </div>
                {notempty name='property_pic'}
                <link rel="stylesheet" href="__CSS__/shapan.css">
                <div class=" m_t_15">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/info',['house_id'=>$info['id']])}">更多 ></a></span>楼栋信息</div>
                    <div class="news_h_box03" id="shapan">
                        <div id="shapan-i">
                            <img id="MapImages" src="{$property_pic.img}" />
                            {volist name="property_pic['data']" id='vo'}
                            {php}$point=explode(',',$vo['point']);{/php}
                            <a href="javascript:;" data-position="{$vo.point}" data-bid="{$vo.id}" class="sha-dot sha-dot-{$vo.sale}" title="{$vo.title}" style="left: {$point[0]}px; top: {$point[1]}px;"><i></i>{$vo.title}</a>
                            {/volist}
                        </div>

                    </div>
                </div>
                {/notempty}
                <div class="m_t_15">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/info',['house_id'=>$info['id']])}">更多 ></a></span>楼盘介绍</div>
                    <div class="news_h_box04_i">
                        {$info.info}
                    </div>
                </div>

                <div class="m_t_15">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/info',['house_id'=>$info['id']])}">更多 ></a></span>楼盘信息</div>
                    <div class="news_h_box05">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <th width="23%">开盘时间</th>
                                <td width="77%">{$info.open_time}</td>
                            </tr>
                            <tr>
                                <th>交房时间</th>
                                <td>{$info.complate_time}</td>
                            </tr>
                            <tr>
                                <th>楼盘地址</th>
                                <td>{$info.address}</td>
                            </tr>
                            <tr>
                                <th>售楼处地址</th>
                                <td>{$info.sale_address}</td>
                            </tr>
                            <tr>
                                <th>占地面积</th>
                                <td>{$info.attr.hxmj}</td>
                            </tr>
                            <tr>
                                <th>建筑面积</th>
                                <td>{$info.attr.jzmj}</td>
                            </tr>
                            <tr>
                                <th>开发商</th>
                                <td>{$info.attr.kfs}</td>
                            </tr>
                            <tr>
                                <th>容积率</th>
                                <td>{$info.attr.rjl}</td>
                            </tr>
                            <tr>
                                <th>绿化率</th>
                                <td>{$info.attr.lhl}</td>
                            </tr>
                            <tr>
                                <th>规划户数</th>
                                <td>{$info.attr.hushu}</td>
                            </tr>
                            <tr>
                                <th>车位数</th>
                                <td>{$info.attr.chewei}</td>
                            </tr>
                            <tr>
                                <th>楼盘朝向</th>
                                <td>{$info.attr.loupanzhaoxiang}</td>
                            </tr>
                            <tr>
                                <th>产权年限</th>
                                <td>{$info.attr.jzlb} {$info.attr.chanquan}</td>
                            </tr>
                            <tr>
                                <th>装修情况</th>
                                <td>{$info.attr.zxqk}</td>
                            </tr>

                            <tr>
                                <th>物业公司</th>
                                <td>{empty name='info.attr.wygs'}暂无资料{else /}{$info.attr.wygs}{/empty}</td>
                            </tr>
                            <tr>
                                <th>物业费</th>
                                <td>{$info.attr.wuyefee}</td>
                            </tr>
                            <tr>
                                <th>预售证</th>
                                <td>{$info.yushou}</td>
                            </tr>
                            <tr>
                                <th>建筑设计单位</th>
                                <td>{empty name='info.attr.shejidanwei'}暂无资料{else /}{$info.attr.shejidanwei}{/empty}</td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="m_t_15">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/pic',['house_id'=>$info['id']])}">更多 ></a></span>楼盘相册</div>
                    <div class="n_b_07 overflow_h">
                        <ul>
                            {volist name='picList' id='vo'}
                            <li><a href="{:url('Loupan/pic',['house_id'=>$info['id']])}"><img src="__IMG__/loading.gif" class="lazy" data-original="{$vo.img}" width="250" height="168"></a></li>
                            {/volist}
                        </ul>
                    </div>
                </div>
                <div class="m_t_15 overflow_h">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/peitao',['house_id'=>$info['id']])}">更多 ></a></span>周边配套</div>
                    <iframe width="100%" height="auto" frameborder="0" scrolling="no" src="{:url('Api/map',['id'=>$info['id'],'model'=>'house','lat'=>$info.lat,'lng'=>$info.lng])}" id="main" style="height: 500px;"></iframe>
                </div>
                <div class="m_t_15">
                    <div class="title03"><span class="more"><a href="{:url('Loupan/question',['house_id'=>$info['id']])}">更多 ></a></span>楼盘问答</div>
                    <div class="overflow_h">
                        <div class="float_r m_t_15"><a href="{:url('Loupan/question',['house_id'=>$info['id']])}" class="but11">我要提问</a></div>
                    </div>
                    {fang:lists table='ask' where="house_id=$id and status=1" order='id desc' limit='5' id='data'}
                    <dl class="dl_p overflow_h border-bottom">
                        <dt><img src="__IMG__/loading.gif" class="lazy" data-original="{$data.user.headimgurl}" width="50" height="50" /></dt>
                        <dd class="dl01"><i class="text11">{empty name='data.user_id'}匿名用户{else /}{$data.user_name}{/empty}</i><span>{:date("Y-m-d H:i:s",$data['create_time'])}</span></dd>
                        <dd class="dl02"><a href="{:url('Question/detail',['id'=>$data['id']])}" target="_blank">{$data.content}</a></dd>
                        {php}$askid=$data['id'];{/php}
                        {fang:lists table='answer' where="ask_id=$askid and status=1" order='id desc' limit='5' empty=' ' id='vo'}
                        <dl class="dl_p overflow_h" style="padding-left:40px;">
                            <dt><img src="__IMG__/loading.gif" class="lazy" data-original="{$vo.user.headimgurl}" width="50" height="50" /></dt>
                            <dd class="dl01 answer-title" style="width:700px;"><i class="text11">{$vo.user.nickname}</i>{notempty name='vo.user.buy_phone'}<span>咨询电话：{$vo.user.buy_phone}</span>{/notempty}<span>{:date("Y-m-d H:i:s",$data['create_time'])}</span></dd>
                            <dd class="dl02 answer" style="width:700px;">{$vo.content}</dd>
                        </dl>
                        {/fang:lists}
                    </dl>
                    {/fang:lists}

                </div>

            </div>
        </div>
        <div class="house_r">
            <div class="title01">推荐楼盘</div>
            <div class="n_h_s_right">
                {include file='loupan/right' /}
            </div>
        </div>
    </div>

</div>
<script src="__PUBLIC__/js/plugins/jqmodal.js"></script>
<script src="__JS__/imgList/js/carousel.min.js"></script>
<script>
    $(function(){
        $(".detail_slide").thumbnailImg({
            large_elem: ".large_box",
            small_elem: ".small_list",
            left_btn: ".left_btn",
            right_btn: ".right_btn"
        });
        $('#shapan-i').jqDrag({
            attachment:'#shapan'
        });
        $('.J_col').bind('click',function(){
            var url = $(this).data('uri'),id = $(this).data('bid'),me=$(this);
            var param = {id:id},num = me.find('span').text();
            $.get(url,param,function(res){
                if(res.status == 1){
                    me.find('span').text(parseInt(num)+1);
                    layer.msg(res.msg,{icon:1});
                }else{
                    layer.msg(res.msg,{icon:2});
                }
            });
        });
    });
</script>
{/block}